package org.gd136.ce.action;

import com.badlogic.gdx.scenes.scene2d.Action;

public class CallAction extends Action {
	Runnable run;

	public CallAction(Runnable run) {
		this.run = run;
	}

	@Override
	public boolean act(float delta) {
		if (run != null) {
			run.run();
		}
		return true;
	}

	public static CallAction create(Runnable run) {
		return new CallAction(run);
	}
}
